import process from "node:process";
import color from "ansis";
import * as Diff from "diff";

const swc = /* css */ "";
const babel = /* HTML */ "";

/// //////////////////////////////////////////////////////////
const diff = Diff.diffChars(swc, babel);

for (const part of diff) {
  // green for additions, red for deletions
  const text = part.added
    ? color.bgGreen(part.value)
    : part.removed
      ? color.bgRed(part.value)
      : part.value;
  process.stderr.write(text);
}
